<template>
	<view class="home">
		<view class="topitem" @click="ceLiuChe" style="background-color: #8158af;">
			<view class="topimage"></view>
			<view class="topfilx">
				自动测流车
			</view>
			<view class="topfilxa">
				<uni-icons type="arrow-right" size="30" color="#8158af"></uni-icons>
			</view>
		</view>
		<view class="topitem"  @click="cezhanList('zd')" style="background-color: #8158af;">
			<view class="topimage" ></view>
			<view class="topfilx" >
				自动测量
			</view>
			<view class="topfilxa">
				<uni-icons type="arrow-right" size="30" color="#8158af"></uni-icons>
			</view>
		</view>
		<view class="topitem"  @click="automaticCal" style="background-color: #5e78a3;">
			<view class="topimage"></view>
			<view class="topfilx">
				手动计算
			</view>
			<view class="topfilxa">
				<uni-icons type="arrow-right" size="30" color="#5e78a3"></uni-icons>
			</view>
		</view>
		<view class="topitem"  @click="cezhanList('sd')" style="background-color: #5e78a3;">
			<view class="topimage"></view>
			<view class="topfilx">
				手动测量
			</view>
			<view class="topfilxa">
				<uni-icons type="arrow-right" size="30" color="#5e78a3"></uni-icons>
			</view>
		</view>
		<view class="topitem" @click="cesuyi" style="background-color: #73967b;">
			<view class="topimage"></view>
			<view class="topfilx">
				配置流速仪参数
			</view>
			<view class="topfilxa" >
				<uni-icons type="arrow-right" size="30" color="#73967b"></uni-icons>
			</view>
		</view>
		<view class="topitem" @click="cezhan" style="background-color: #73967b;">
			<view class="topimage"></view>
			<view class="topfilx">
				配置测站信息
			</view>
			<view class="topfilxa">
				<uni-icons type="arrow-right" size="30" color="#73967b"></uni-icons>
			</view>
		</view>
		<view class="topitem" @click="tuoguan" style="background-color: #73967b;">
			<view class="topimage"></view>
			<view class="topfilx">
				配置毕托管终端
			</view>
			<view class="topfilxa">
				<uni-icons type="arrow-right" size="30" color="#73967b"></uni-icons>
			</view>
		</view>

	</view>
</template>

<script>
	// import vuex from '../../tm-vuetify/tool/function/vuex';
	export default {
		data() {
			return {

			}
		},
		onLoad() {

		},
		onShow() {

		},
		destroyed() {
			console.log('销毁');
		},
		methods: {
			cesuyi() {
				if (this.vuex_devicename == '') {
					uni.showToast({
						title: '蓝牙未连接',
						duration: 2000
					});
					return
				}
				uni.navigateTo({
					url: '/pagesA/aproductA/cesuyi'
				});
			},
			cezhan() {
				if (this.vuex_devicename == '') {
					uni.showToast({
						title: '蓝牙未连接',
						duration: 2000
					});
					return
				}
				uni.navigateTo({
					url: '/pagesA/aproductA/courseA'
				});
			},
			tuoguan() {
				if (this.vuex_devicename == '') {
					uni.showToast({
						title: '蓝牙未连接',
						duration: 2000
					});
					return
				}
				uni.navigateTo({
					url: '/pages/home/measuringflow/bituoguan'
				});
			},
			ceLiuChe() {
				// if (this.vuex_devicename == '') {
				// 	uni.showToast({
				// 		title: '蓝牙未连接',
				// 		duration: 2000
				// 	});
				// 	return
				// }
				uni.navigateTo({
					url: '/pages/home/measuringflow/ceLiuChe'
				});
			},
			automaticCal() {
				uni.navigateTo({
					url: '/pagesA/aproductA/automaticCalCezhan'
				});
			},
			netliu() {
				// uni.navigateTo({
				// 	url: '/pages/aproduct/netliusuyi'
				// });
			},
			// measureaCAL() {
			// 	uni.navigateTo({
			// 		url: '/pagesA/aproductA/measureaCAL'
			// 	});
			// },
			cezhanList(sy) {
				if (this.vuex_devicename == '' && sy == 'zd') {
					uni.showToast({
						title: '蓝牙未连接',
						duration: 2000
					});
					return
				}
				console.log('id',sy);
				uni.redirectTo({
					url: '/pagesA/aproductA/measureLiusuyi?&ty='+sy
					// url: '/pagesA/aproductA/cezhanList'
				});
			},
			// celiang(){
			// 	uni.$u.vuex('vuex_cexian', [])
			// 	uni.navigateTo({
			// 		url: '/pagesA/aproductA/measureA'
			// 	});

			// }
		}
	}
</script>
<style>
	page {
		background-color: #f8f8f8;
	}
</style>
<style scoped lang="scss">
	.home {
		width: 690rpx;
		padding: 30rpx;

		.topitem {
			// height: 150rpx;
			border-radius: 20rpx;
			padding: 40rpx 20rpx;
			display: flex;
			justify-content: space-around;
			align-items: center;
			margin: 0 0 30rpx 0;
			background-color: #f8f8f8;
			color: #ffffff;
			border: #ffffff solid 3rpx;
			box-shadow: 5rpx 5rpx 20rpx #e1e1e1;


			.topfilx {
				width: 350rpx;
				text-align-last: justify;
				font-size: 45rpx;
			}

			.topfilxa {
				width: 100rpx;
				text-align: center;
				border-radius: 50rpx;
				background-color: #ffffff;
			}
		}
		// .topimage {
		// 	width: 120rpx;
		// 	height: 120rpx;
		// 	border-radius: 10rpx;
			
		// }
		.topimage {
		  width: 20rpx;
		  height: 20rpx;
		  // border: 13rpx solid #00aa7f;
		  border-radius: 50rpx;
		  background-color: #ffffff;
		}
	}
</style>